//
//  OffLineMapViewController.m
//  StationManager
//
//  Created by 泽华伟业 on 17/3/14.
//  Copyright © 2017年 Helong. All rights reserved.
//

#import "OffLineMapViewController.h"
#import <BaiduMapKit/BaiduMapAPI_Map/BMKOfflineMap.h>

@interface OffLineMapViewController ()<BMKOfflineMapDelegate>

@property (nonatomic,strong) BMKOfflineMap *offlineMap;
@end

@implementation OffLineMapViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    _offlineMap = [[BMKOfflineMap alloc]init];
    _offlineMap.delegate = self;
    NSArray *allCityArray = [_offlineMap getOfflineCityList];
    for (BMKOLSearchRecord *record in allCityArray) {
//       HLog(@"%@,%d",record.cityName,record.cityID);
        if (record.cityID == 12) {
            NSArray *array = record.childCities;
            for (BMKOLSearchRecord *childRecord in array) {
                HLog(@"%@",childRecord.cityName);
            }
        }
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)onGetOfflineMapState:(int)type withState:(int)state{
//状态
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
